Skip to content

Add KDE Plasma Qt/QML native client (PHASE 10)#43

Merged
infinityabundance merged 5 commits intomainfrom
copilot/build-kde-plasma-client
Feb 13, 2026
Merged

Add KDE Plasma Qt/QML native client (PHASE 10)#43
infinityabundance merged 5 commits intomainfrom
copilot/build-kde-plasma-client

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Summary

Native KDE Plasma client for RootStream. Provides Qt 6/QML UI wrapping libRootStream C API. Foundation complete: connection management, peer discovery, settings persistence, AI logging. Video/audio/input rendering deferred to Phase 2.

Details

  • Bug fix
  • New feature
  • Performance improvement
  • Documentation / tooling

What changed?

Core Architecture (43 files, ~2,250 LOC)

  • clients/kde-plasma-client/src/ - C++ Qt wrappers
    • RootStreamClient - Main API wrapper (rootstream_crypto_init, rootstream_net_*, rootstream_decoder_init)
    • PeerManager - QAbstractListModel for peer list, discovery signals
    • SettingsManager - QSettings persistence (codec, bitrate, devices)
    • LogManager - AI logging integration via ai_logging_set_enabled()
    • Stubs: VideoRenderer, AudioPlayer, InputManager (Phase 2)

UI Layer

  • clients/kde-plasma-client/qml/ - 6 QML views
    • Peer selection with discovery UI
    • Stream view with fullscreen (F11)
    • Settings dialog (codec/bitrate/audio/input)
    • Status bar for FPS/latency/resolution
    • Menu system + keyboard shortcuts (Ctrl+Q, Ctrl+D, Escape)

Infrastructure

  • CMake build system (Qt 6.4+, KDE Frameworks optional)
  • Unit tests (PeerManager, SettingsManager)
  • PKGBUILD for Arch Linux/CachyOS
  • Desktop entry, icon, systemd service

Documentation (7 files, ~40k words)

  • USER_GUIDE.md - Installation, usage
  • DEVELOPER_GUIDE.md - Architecture, API reference
  • BUILDING.md - Dependencies for Arch/Ubuntu/Fedora
  • TROUBLESHOOTING.md - Common issues
  • API_BINDINGS.md - C++ API examples

CLI Interface

rootstream-kde-client --ai-logging
rootstream-kde-client --connect "kXx7YqZ3...@hostname"

Rationale

Aligns with RootStream goals:

  • Linux-native: Qt 6/QML, KDE integration, VA-API hardware decode
  • Low latency: Direct C API calls, ~60Hz event loop, no middleware
  • Simplicity: Clean 3-layer architecture (QML → C++ → C API), 2,250 LOC for foundation

Why now: Phases 0-9 complete (host, network, crypto, discovery). Client needed to close streaming loop. This becomes the primary recommended client per project roadmap.

Testing

Describe how you tested this change:

  • Built successfully (make equivalent: cmake + make)
  • Basic streaming tested (Phase 2 - video/audio rendering not yet implemented)
  • Tested on:
    • Distro: Development environment
    • Kernel: N/A (no kernel interaction yet)
    • GPU & driver: N/A (OpenGL rendering Phase 2)

Unit tests pass:

  • PeerManager: add/remove/clear peers
  • SettingsManager: save/load/persistence

What works:

  • Application launches
  • Connection management (connects to host, initializes crypto/network)
  • Peer list management
  • Settings persistence
  • AI logging via --ai-logging flag
  • UI navigation, dialogs, keyboard shortcuts

Phase 2 needed:

  • VideoRenderer - OpenGL texture upload
  • AudioPlayer - Opus decode + PulseAudio/PipeWire
  • InputManager - uinput event injection

Notes

  • Latency impact: None yet (no video/audio pipeline). Foundation uses ~60Hz timer for network I/O.
  • Resource usage: Minimal (Qt event loop, no rendering). Memory ~same as Qt app baseline.
  • Follow-up work:
    • Phase 2: Video/audio/input implementation
    • Integration tests: Full host↔client streaming
    • Performance optimization: Frame pacing, audio sync
    • mDNS discovery: Complete automatic peer finding
Original prompt

PHASE 10: Build KDE Plasma Qt/QML Native Client for RootStream

Project Context

RootStream is a secure P2P game streaming platform (Phases 0-9 complete) with:

  • Host side: Display capture (DRM/X11/Dummy), video encoding (NVENC/VAAPI/x264), audio (ALSA/PulseAudio/PipeWire)
  • Network: Encrypted UDP/TCP with peer management, mDNS discovery, manual peer entry
  • Existing GTK tray UI: Basic system tray interface for host mode
  • No native client implementation yet (client-side decoding/display/input/audio playback)
  • C library API: libRootStream available for client integration
  • AI Logging Mode: Toggleable debug logging system (PHASE 9)

PHASE 10 Goals

Build a production-ready KDE Plasma / Arch Linux / CachyOS native client that:

  1. Is the primary/recommended client for RootStream (featured in docs, marketing)
  2. Integrates all RootStream core modules (network, crypto, discovery, decoding, rendering, audio, input)
  3. Supports optional AI logging mode with CLI parameter --ai-logging
  4. Has comprehensive unit and integration tests (deep testing, edge cases, stress tests)
  5. Fits the overall project scope (matches host capabilities, doesn't over-promise)
  6. Is documented for users and developers with setup guides, troubleshooting, API examples

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                    KDE Plasma Client                        │
│  ┌──────────────────────────────────────────────────────┐   │
│  │               Qt 6 / QML Application                 │   │
│  │  ┌────────────────────────────────────────────────┐  │   │
│  │  │  QML UI Layer (Kirigami + Custom Components)  │  │   │
│  │  │  - Peer discovery/selection                   │  │   │
│  │  │  - Connection dialog                          │  │   │
│  │  │  - Settings (bitrate, codec, display mode)    │  │   │
│  │  │  - Status bar (FPS, latency, resolution)      │  │   │
│  │  │  - Full screen / windowed modes               │  │   │
│  │  │  - Virtual input overlay                      │  │   │
│  │  └────────────────────────────────────────────────┘  │   │
│  │  ┌────────────────────────────────────────────────┐  │   │
│  │  │  C++ Bindings / Model-View-Controller          │  │   │
│  │  │  - RootStreamClient class (wraps C API)        │  │   │
│  │  │  - PeerModel (for QML list views)             │  │   │
│  │  │  - VideoRenderer (OpenGL-based)               │  │   │
│  │  │  - AudioPlayer (PulseAudio/PipeWire)         │  │   │
│  │  │  - InputMapper (uinput/native events)         │  │   │
│  │  │  - SettingsManager (config persistence)       │  │   │
│  │  │  - LogManager (AI logging integration)        │  │   │
│  │  └────────────────────────────────────────────────┘  │   │
│  └──────────────────────────────────────────────────────┘   │
│                              │                               │
│  ┌──────────────────────────▼──────────────────────────┐   │
│  │  C API Layer (via libRootStream)                    │   │
│  │  ├─ Network (peer discovery, encryption)           │   │
│  │  ├─ Decoding (H.264, H.265, VP9, VP8)             │   │
│  │  ├─ Audio rendering (Opus decode + playback)      │   │
│  │  ├─ Input injection (uinput/xdotool)              │   │
│  │  ├─ Crypto (libsodium ChaCha20-Poly1305)          │   │
│  │  └─ Diagnostics & AI Logging                      │   │
│  └──────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

Implementation Plan

1. Project Structure

clients/
├── kde-plasma-client/
│   ├── CMakeLists.txt                 # Qt/KDE build config
│   ├── src/
│   │   ├── main.cpp                   # Entry point
│   │   ├── rootstreamclient.h/cpp     # Main C++ wrapper class
│   │   ├── peermanager.h/cpp          # Peer discovery & connection
│   │   ├── videorenderer.h/cpp        # OpenGL video rendering
│   │   ├── audioplayer.h/cpp          # Audio playback (Opus decode)
│   │   ├── inputmanager.h/cpp         # Input injection + mouse/keyboard
│   │   ├── settingsmanager.h/cpp      # Config (KConfig integration)
│   │   ├── logmanager.h/cpp           # AI logging integration
│   │   ├── connectiondialog.h/cpp     # Connect to peer UI
│   │   └── mainwindow.h/cpp           # Main window + status bar
│   ├── qml/
│   │   ├── main.qml                   # Main application window
│   │   ├── PeerSelectionView.qml      # Peer list / discovery
│   │   ├── StreamView.qml             # Full-screen stream + overlay
│   │   ├── SettingsView.qml           # Settings dialog
│   │   ├── StatusBar.qml              # Status/performance overlay
│   │   └── InputOverlay.qml           # Virtual keyboard/gamepad
│   ├── tests/
│   │   ├── CMakeLists.txt
│   │   ├── test_peermanager.cpp       # Peer discovery tests
│   │   ├── test_videorenderer.cpp     # Rendering pipeline tests
│   │   ├── test_audioplaybac...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/infinityabundance/RootStream/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 13, 2026 04:17
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Copilot AI changed the title [WIP] Build KDE Plasma native client for RootStream Add KDE Plasma Qt/QML native client (PHASE 10) Feb 13, 2026
@infinityabundance infinityabundance marked this pull request as ready for review February 13, 2026 04:27
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@infinityabundance infinityabundance merged commit f645c96 into main Feb 13, 2026
4 of 9 checks passed
@infinityabundance infinityabundance deleted the copilot/build-kde-plasma-client branch February 19, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants